-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Upgrade to rebar3 3.18, with improvements in packaging and release assembly #1097
WIP Upgrade to rebar3 3.18, with improvements in packaging and release assembly #1097
Conversation
works better for non-standard installations of otp
99fd82c
to
8207626
Compare
409d079
to
7cff235
Compare
See TI-Tokyo/rebar3@48344c200353c It comes with a new relx which allows for many simplifications in the launcher script: * The riak script it generates has rpc facility built in. * No need to supply dummy sys.config and vm.args. We do, however, need to write and delete the pid file ourselves.
Specifically, those in eleveldb submodules # Conflicts: # Makefile
* set DEBEMAIL; * move deb/debian/vars.config to ..; * add missing build dependency on libpam0g-dev; * rm /var/lib/riak on purge.
* add gcc-c++ to BuildRequires; * embrace systemd.
Incidentally, bump riak_kv dep to 3.0.9.2 (does code:load in schema, just for osx)
The `-` option is there primarily for one side effect: it does`cd` to riak user's HOME (/var/lib/riak). Critically, this dir has the erlang cookie file, which is read from the new node started as part of some riak-admin commands (e.g., riak-admin test). It, however, creates a barrier for env vars, which is undesirable. If we cd manually into riak's HOME before the call to `su`, the piggy node now can find the cookie in its cwd, and execution of the command succeeds.
86ad602
to
7e3661a
Compare
* resuscitate riak-chkconfig; * make `make rel` relocatable again, fix riak-debug for it; * remove runner_* substitution vars in all rel/**/vars.config;
7e3661a
to
9cb62b8
Compare
|
||
case "$1" in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does each command need to be present in this case - is this not already handled in the extended start script as extensions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an effort to make hyphenated and non-hyphenated forms equivalent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it works as expected, and I'm not even sure that resurrecting the hyphenated commands is warranted - what purpose does it serve? It's been a couple of years since we moved to start script extensions. You now have to re-insert a bunch of boilerplate environment stuff at the top of the script files to make them work, whereas that was all inherited with from the root start script with extensions.
My opinion is that it's a backwards step, unless there's a compelling reason that I'm not aware of / considering.
The tidy up across the rest of the release config is very decent though, and much needed. Some of the deps currently reference TI forks, which would need to target basho, but guess that would be fixed up before everything gets merged in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To deal with the easier part first: re-pinning deps to TI-Tokyo repos has a single purpose: pull in cuttlefish and rebar3_cuttlefish, not so much for the fqdn data type in cuttlefish but rather for several commits in the plugin that make it compatible with rebar3 3.18 (by ioolkos, see this one and thereabout), synchronize its internal install_update_escript with the "upstream" version of it in relx, and last but not least, this little gem.
I note that the fqdn-type patch has already been merged in basho/cuttlefish, but there is no tag. If you do the tagging, I will then prepare the necessary PRs to bump cuttlefish version where necessary (it is an explicit dependency in bitcask, clique, eleveldb and riak_sysmon), and collect a patchset for another PR in rebar3_cuttlefish.
Regarding the phasing out of hyphenated forms, I have no strong opinions and will gladly follow the party line (although I would invite @Bob-The-Marauder to this discussion, who has been in the business of dealing with customers for some time).
For the record, my understanding of the underlying machinery is as follows:
- The
riak
script generated by relx and/or cuttlefish provides basic commands like start, stop, console, pid, ping, rpc. It is how riak is started/stopped in riak_test setting. It is not under our control. - The other
riak
, the one created from the template in rel/files, has a distinct and specific purpose:- it takes care of the pid file (relx-generated one will not do this for us);
- it does
su
as appropriate, and is therefore installed in PATH when riak is installed from a package; - it launches
riak-admin
etc when called asriak admin
.
I saw this last item precisely as a way to enable non-hyphenated forms (if we remove riak-admin and its hyphenated friends from PATH, the move to hide hyphenated forms will be complete, from the user standpoint). Apparently, by "move to start script extensions" you mean to do it differently -- perhaps by injecting code in the script produced by relx? If so, I would be happy to rework my contribution accordingly, but I didn't see how relx can be massaged to achieve that.
@martincox Re:
With 1ce0262, when installed from a package on a debian11 system, we now have:
It's another possible regression. I have the |
@hmmr wanted to try test this today, but had issues fetching the referred to tag in riak_repl. Is the TI-Tokyo riak_repl repo public? |
@martinsumner It is indeed private. The change I pushed in TI-Tokyo repo is just I have traced the pid file regression, which was in rebar3_cuttlefish plugin (it was introduced by vernemq people in their more recent changes, and adopted by too eager me). I have reverted to version 0.2.0, tweaking it to work with rebar3.18 (and noticed that @martincox has already done the same). I have just re-pointed rebar3_cuttlefish to basho/develop branch, and it is great again. There are still issues with f75df62, which I am trying to fix, but you should be able to build it locally with |
…ut, for faster package builds
…upgrade-to-rebar3.17
6274458
to
f0dc94c
Compare
Superseded by #1108. |
This is a patchset inspired by the work I have been doing for some months on Riak CS/Stanchion 3.0. It includes:
git revlist
in repos with same-name branch and tag, and eventually, to 3.18 (where that patch has been merged). The bug this patch addresses is triggered when (for example) a build is attempted on dockerhub.com.make package
now works on OSX 14, where it is essentially the result ofmake rel
, tarred.-
option tosu
in the launcher script, which removes the su barrier for env vars (something requested in another PR).make rel
relocatable again (specifically, to enable OSX package);riak-admin command
equivalent toriak admin command
(also applies toriak-repl
andriak-debug
);There are no changes in Erlang code.
Testing was done as follows:
make package
, and installed;riak pid
,riak ping
,riak-admin status
work as expected;riak-admin test
passes;riak-admin member-status
and other cluster-related commands work;riak-debug
succeeds;riak-cs-admin test
succeeds;